package com.wwg.cms.bo.entity;
import com.wwg.cms.bo.*;
/**
 *create auto on 2010-8-31 16:43:18
 *create by wwl
 * user
 * 
 * @hibernate.class table="user" *  mutable="true" 
 *  proxy="com.wwg.cms.bo.entity.UserEntity" 
 */
public class UserEntity implements User{

	 private Long id;
	 private String name;
	 private String password;
	 private Boolean enable;
	 private String contact;
	 private String telephone;
	 private String address;
	 private String mobile;
	 private String email;
	 private String qq;
	 private String post;
	 private String introduce;
	 private java.util.Date createDate;
	 private java.util.Date updateDate;
	 private String question;
	 private String answer;
	 private Role roleId;
	/**
	 *
 	 *
	 * @hibernate.id  column="id"
	 *  unsaved-value="null"
 	 *  generator-class="native"
	 * @return Long 
	 */
	public Long getId() {
		return id;
	}
	public void setId(Long id){
		this.id = id;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="name"
	 * @return String 
	 */
	public String getName() {
		return name;
	}
	public void setName(String name){
		this.name = name;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="password"
	 * @return String 
	 */
	public String getPassword() {
		return password;
	}
	public void setPassword(String password){
		this.password = password;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="enable"
	 * @return Boolean 
	 */
	public Boolean getEnable() {
		return enable;
	}
	public void setEnable(Boolean enable){
		this.enable = enable;
	}
	/**
	 *联系人
 	 *
	 * @hibernate.property column="contact"
	 * @return String 
	 */
	public String getContact() {
		return contact;
	}
	public void setContact(String contact){
		this.contact = contact;
	}
	/**
	 *联系电话
 	 *
	 * @hibernate.property column="telephone"
	 * @return String 
	 */
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone){
		this.telephone = telephone;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="address"
	 * @return String 
	 */
	public String getAddress() {
		return address;
	}
	public void setAddress(String address){
		this.address = address;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="mobile"
	 * @return String 
	 */
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile){
		this.mobile = mobile;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="email"
	 * @return String 
	 */
	public String getEmail() {
		return email;
	}
	public void setEmail(String email){
		this.email = email;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="qq"
	 * @return String 
	 */
	public String getQq() {
		return qq;
	}
	public void setQq(String qq){
		this.qq = qq;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="post"
	 * @return String 
	 */
	public String getPost() {
		return post;
	}
	public void setPost(String post){
		this.post = post;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="introduce"
	 * @return String 
	 */
	public String getIntroduce() {
		return introduce;
	}
	public void setIntroduce(String introduce){
		this.introduce = introduce;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="create_date"
	 * @return java.util.Date 
	 */
	public java.util.Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(java.util.Date createDate){
		this.createDate = createDate;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="update_date"
	 * @return java.util.Date 
	 */
	public java.util.Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(java.util.Date updateDate){
		this.updateDate = updateDate;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="question"
	 * @return String 
	 */
	public String getQuestion() {
		return question;
	}
	public void setQuestion(String question){
		this.question = question;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="answer"
	 * @return String 
	 */
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer){
		this.answer = answer;
	}
	/**
	 *
 	 *
	 * @hibernate.many-to-one  column="role_id"  
	 *      class = "com.wwg.cms.bo.entity.RoleEntity"
	 * @return Role 
	 */
	public Role getRoleId() {
		return roleId;
	}
	public void setRoleId(Role roleId){
		this.roleId = roleId;
	}
  @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserEntity that = (UserEntity) o;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? UserEntity.class.hashCode()+id.hashCode() : UserEntity.class.hashCode();
    }


}


